/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:47 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class DekiemtraEntity
    {
        public DekiemtraEntity()
        {
			m_pk_idekiemtraid=0;
			m_stendekiemtra="";
			m_sghichu="";
			m_dngaytao=DateTime.Now;
			m_dngaycapnhat=DateTime.Now;
			m_fk_inguoitaoid=0;
			m_fk_inguoicapnhatid=0;
			m_fk_ihinhthuckiemtraid=0;
        }
		private Int64 m_pk_idekiemtraid;
		public Int64 PK_iDekiemtraID
		{
			get { return m_pk_idekiemtraid ; }
			set { m_pk_idekiemtraid = value; }
		}
		private String m_stendekiemtra;
		public String sTendekiemtra
		{
			get { return m_stendekiemtra ; }
			set { m_stendekiemtra = value; }
		}
		private String m_sghichu;
		public String sGhichu
		{
			get { return m_sghichu ; }
			set { m_sghichu = value; }
		}
		private DateTime m_dngaytao;
		public DateTime dNgaytao
		{
			get { return m_dngaytao ; }
			set { m_dngaytao = value; }
		}
		private DateTime m_dngaycapnhat;
		public DateTime dNgaycapnhat
		{
			get { return m_dngaycapnhat ; }
			set { m_dngaycapnhat = value; }
		}
		private Int64 m_fk_inguoitaoid;
		public Int64 FK_iNguoitaoID
		{
			get { return m_fk_inguoitaoid ; }
			set { m_fk_inguoitaoid = value; }
		}
		private Int64 m_fk_inguoicapnhatid;
		public Int64 FK_iNguoicapnhatID
		{
			get { return m_fk_inguoicapnhatid ; }
			set { m_fk_inguoicapnhatid = value; }
		}
		private Int16 m_fk_ihinhthuckiemtraid;
		public Int16 FK_iHinhthuckiemtraID
		{
			get { return m_fk_ihinhthuckiemtraid ; }
			set { m_fk_ihinhthuckiemtraid = value; }
		}

        #region Comparison
        public static List<DekiemtraEntity> Sort(List<DekiemtraEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(DekiemtraEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<DekiemtraEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<DekiemtraEntity> COMPARISON_PK_iDekiemtraID
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.PK_iDekiemtraID.CompareTo(other.PK_iDekiemtraID);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_sTendekiemtra
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.sTendekiemtra.CompareTo(other.sTendekiemtra);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_sGhichu
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.sGhichu.CompareTo(other.sGhichu);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_dNgaytao
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.dNgaytao.CompareTo(other.dNgaytao);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_dNgaycapnhat
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.dNgaycapnhat.CompareTo(other.dNgaycapnhat);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_FK_iNguoitaoID
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.FK_iNguoitaoID.CompareTo(other.FK_iNguoitaoID);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_FK_iNguoicapnhatID
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.FK_iNguoicapnhatID.CompareTo(other.FK_iNguoicapnhatID);
				};
			}
		}
		public static Comparison<DekiemtraEntity> COMPARISON_FK_iHinhthuckiemtraID
		{
			get
			{
				return delegate(DekiemtraEntity entity,DekiemtraEntity other)
				{
					return entity.FK_iHinhthuckiemtraID.CompareTo(other.FK_iHinhthuckiemtraID);
				};
			}
		}
        #endregion
    }
}
